import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBaseTraversers;
import sun.security.util.Password;

import java.util.Scanner;

public class AdministratorsTset {
    public static void main(String[] args) {
        Administrators a = new Administrators();
        Scanner input = new Scanner(System.in);
        System.out.println("请输入用户名");
        a.name = input.next();
        System.out.println("请输入密码");
        a.password = input.next();
        if ((a.name.equals("123")) && (a.password.equals("123"))) {
            System.out.println("请输入新的密码");
            String p1 = input.next();
            System.out.println("请再次输入新的密码");
            String p2 = input.next();
            if (p1.equals(p2) ) {
                a.password = p1;
                System.out.println("密码修改成功，新密码为" + a.password);
            } else {
                System.out.println("两次密码不一致，请重新输入");
            }

        } else {
            System.out.println("用户名或密码错误，请重新输入");
        }
        a.show();


    }
}
